<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test Validation</title>
<link rel="stylesheet" type="text/css" href="js/jQuery-File-Upload/uploadfile.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/validation/jquery.validate.min.js"></script>
<script src="js/validation/additional-methods.js"></script>
<!--<script src="js/fileinput/jquery.fileinput.min.js"></script>-->
<script src="js/common.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
    
	//$("input[type=file]").fileinput("<button>Select Files</button>");
	
	$("input[type='file']").change(function(){  
	                                   removePreviousList(this); 
									   showSelectedFileList(this);
								   });
	
	$("form").validate({
		      debug:true,
			  rules:{
				  upload:{accept:"image/*",filesize:1000}
			  }
		});
		
/*	$("#uploader1").uploadFile({
			url:"YOUR_FILE_UPLOAD_URL",
			fileName:"myfile",
			dragDrop:false
	});*/
});
</script>
<style type="text/css">
label.error {
	margin-left: 5px;
	color: #F00
}
input.error, select.error {
	background: #FFC;
	border: 1px solid #FF0000
}
div.file-list {
	margin: 8px auto 5px auto
}
div.file-list > div {
    display: inline;
    background-color: #F5F5F5;
    border-radius: 3px;
    font: 11px Verdana,Geneva,sans-serif;
    margin-right: 5px;
    padding: 5px;
}
.clearer {
	height: 1px;
	clear: both
}
</style>
</head>
<body>
<form novalidate action="#" method="post" enctype="multipart/form-data">
  <table width="60%" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td valign="top">name: </td>
      <td><input name="name" type="text" required></td>
    </tr>
    <tr>
      <td valign="top">upload:</td>
      <td><input name="upload" type="file" multiple required></td>
    </tr>
    <tr>
      <td valign="top">uploade1: </td>
      <td><div id="uploader1">upload files</div></td>
    </tr>
    <tr>
      <td colspan="2"><input name="" value="submit" type="submit"></td>
    </tr>
  </table>
</form>
</body>
</html>
